package Ex1;

public class Ex2 {
    public static void main(String[]args){
        int x1 = 23;
        int x2 = 22;
        int y1 = 20;
        int y2 = 20;
        System.out.println("俩点之间的距离为："+getDistance(x1 ,x2 ,y1 ,y2));

    }
    public static double getDistance(int x1, int x2, int y1, int y2){
        return Math.sqrt((Math.pow((x1 - x2), 2))+(Math.pow((y1 - y2), 2)));

    }

}
